home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr20 / spr_cut.zip / INTERFAC.H < prev    next >
C/C++ Source or Header  |  1995-03-10  |  3KB  |  66 lines

  1. /* ---------------------------------------------------- */
  2. /* (c) 1995 Niksoft International                       */
  3. /* SPRITE CUTTER UTILITY v2.0                           */
  4. /* ---------------------------------------------------- */
  5. /* INTERFAC.H                                           */
  6. /* interface items module                               */
  7. /* - Menu                                               */
  8. /* - Input box                                          */
  9. /* - Message box                                        */
  10. /* ---------------------------------------------------- */
  11.  
  12. #ifndef __MENUH
  13.  
  14. #define __MENUH
  15.  
  16. typedef struct {
  17.                 char     label[10];
  18.                 unsigned command;
  19.                } MENU_ITEM;
  20.  
  21. typedef struct {
  22.                 char      title[10];
  23.                 unsigned  no_voices;
  24.                 MENU_ITEM *voices;
  25.                } MENU;
  26. #endif
  27.  
  28. #define NO_PROMPT       0
  29. #define PROMPT          1
  30.  
  31. extern int Do_menu(MENU *, unsigned , unsigned);
  32. /* perform the menu'                                 */
  33. /* Parameters:                                       */
  34. /*  MENU *    pointer to the menu structure          */
  35. /*  unsigned  X coordinate of menu window            */
  36. /*  unsigned  Y coordinate of menu window            */
  37. /* Returns:                                          */
  38. /*  The command selected                             */
  39. /*  -1 if an error occurs                            */
  40.  
  41. extern int Input_box(const char *, char *, unsigned, unsigned, unsigned);
  42. /* Keyboard input                                     */
  43. /* Parameters:                                        */
  44. /*  char *    prompt                                  */
  45. /*  char *    buffer where the char read are placed   */
  46. /*  unsigned  buffer size                             */
  47. /*  unsigned  X coordinate of input window            */
  48. /*  unsigned  Y coordinate of input window            */
  49. /* Returns:                                           */
  50. /*  The length of the string read                     */
  51. /*  -1 if an error occurs                             */
  52.  
  53. extern int Message_box(char *, unsigned, unsigned, unsigned);
  54. /* Show a message in a window waiting for a yes/no    */
  55. /* answer if requested                                */
  56. /* Parameters:                                        */
  57. /*  char *    the message                             */
  58. /*  unsigned  X coordinate ...                        */
  59. /*  unsigned  Y coordinate ...                        */
  60. /*  unsigned  if non zero waits for yes/no answer     */
  61. /* Returns:                                           */
  62. /*  0  if all is OK or the answer (if requested) is   */
  63. /*  no.                                               */
  64. /*  1 if the answer (if requested) is yes.            */
  65. /*  -1 if an error occurs                             */
  66.